#ifndef BOOK_H
#define BOOK_H

#include <types.h>

#include <QString>
#include <QDate>

class Book
{
public:
	//! \brief DifferentConstructor.
	explicit Book();

	//! \brief better constructor
	explicit Book( const ID &id,
	               const ID &sharedId,
	               const QString &title,
	               const QString &author,
	               const int &year,
	               const QString &description,
	               const int &price,
	               const bool &wasBorrowed );

	void setId( const ID &id );
	void setSharedId( const ID &sharedId );
	void setTitle( const QString &title );
	void setAuthor( const QString &author );
	void setYear( const int &year );
	void setDescription( const QString &description );
	void setPrice( const int &price );
	void setBorrowDate( const QDate &date );
	void borrowBook();
	void returnBook();

	// Get the id
	ID getId() const;

	// Get the shared id
	ID getSharedId() const;
	QString getTitle() const;
	QString getAuthor() const;
	int getYear() const;
	QString getDescription() const;
	int getPrice() const;
	QDate getBorrowDate() const;
	bool wasBorrowed() const;

	void setWasBorrowed( const bool &value );

private:

	ID m_id;
	ID m_sharedId;
	QString m_title;
	QString m_author;
	int m_year;
	QString m_description;
	int m_price;
	QDate m_borrowDate;
	bool m_wasBorrowed;
};

#endif // BOOK_H
